home *** CD-ROM | disk | FTP | other *** search
/ InfoMagic Internet Tools 1993 July / Internet Tools.iso / RockRidge / security / Watcher / hist_cmd.c < prev    next >
Encoding:
C/C++ Source or Header  |  1989-06-26  |  745 b   |  34 lines

  1. /*
  2.    hist_cmd: a command has been read from the history file.  Do the
  3.    necessary list-building activities for a new command.
  4.  
  5.    Kenneth Ingham
  6.  
  7.    Copyright (C) 1988 The University of New Mexico
  8. */
  9.  
  10. #include "defs.h"
  11.  
  12. hist_cmd(line, cmd_head, cmd_ptr, key_ptr, value_ptr)
  13. char *line;
  14. struct old_cmd_st **cmd_head, **cmd_ptr;
  15. struct key_st **key_ptr;
  16. struct val_st **value_ptr;
  17. {
  18.     /* is this the first? */
  19.     if (*cmd_head == NULL)  {
  20.         *cmd_head = *cmd_ptr = allocate(struct old_cmd_st);
  21.     }
  22.     else {
  23.         (*cmd_ptr)->next = allocate(struct old_cmd_st);
  24.         *cmd_ptr = (*cmd_ptr)->next;
  25.     }
  26.  
  27.     (*cmd_ptr)->keys = NULL;
  28.     (*cmd_ptr)->next = NULL;
  29.     (*cmd_ptr)->pipeline = strsave(line);
  30.     (*cmd_ptr)->next = NULL;
  31.     *key_ptr == NULL;
  32.     *value_ptr == NULL;
  33. }
  34.